//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CmsForms, CmsFormsResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCmsFormsList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CmsFormsResponse>(`/uctoo/cms_forms/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCmsForms = async (id: string) => {
  return requestClient.get<CmsForms>(`/uctoo/cms_forms/${id}`);
};

export const adductooCmsForms = async (data: Partial<CmsForms>) => {
  return requestClient.post<CmsForms>('/uctoo/cms_forms/add', data);
};

export const edituctooCmsForms = async (data: Partial<CmsForms>) => {
  return requestClient.post<CmsForms>('/uctoo/cms_forms/edit', data);
};

export const deleteuctooCmsForms = async (id: string) => {
  return requestClient.post<any>('/uctoo/cms_forms/del', { id });
};
